From: Dirk Brenken Date: Mon, 9 Jun 2025 05:04:15 +0000 (+0200) Subject: luci-app-banip: sync with update 1.5.6-4 X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=b27425edad8d5ab8cd4834b5b627ac6749edc9e2;p=project%2Fluci.git luci-app-banip: sync with update 1.5.6-4 Signed-off-by: Dirk Brenken --- diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/map.html b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/map.html index a125325aef..0c0537b284 100644 --- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/map.html +++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/map.html @@ -33,7 +33,7 @@ /* intialize map */ let map = L.map('map', { - zoom: 4, + zoom: 3, minZoom: 2, maxZoom: 18, center: [50, 10] diff --git a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js index a7c9c5d33d..27067cf138 100644 --- a/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js +++ b/applications/luci-app-banip/htdocs/luci-static/resources/view/banip/setreport.js @@ -92,6 +92,18 @@ function handleAction(report, ev) { ) ]), ]), + E('div', { 'class': 'left', 'style': 'display:flex; flex-direction:column' }, [ + E('label', { 'class': 'cbi-checkbox', 'style': 'padding-top:.5em' }, [ + E('input', { + 'class': 'cbi-checkbox', + 'data-update': 'click change', + 'type': 'checkbox', + 'id': 'filter', + 'value': 'true' + }), + E('span', { 'style': 'margin-left: .5em;' }, _('Show only Set elements with hits')) + ]), + ]), E('div', { 'class': 'left', 'style': 'display:flex; flex-direction:column' }, [ '\xa0', E('h5', _('Result')), @@ -112,10 +124,12 @@ function handleAction(report, ev) { E('button', { 'class': 'btn cbi-button-action', 'click': ui.createHandlerFn(this, function (ev) { + const checkbox = document.getElementById('filter'); + const isChecked = checkbox.checked; let set = document.getElementById('set').value; if (set) { document.getElementById('result').textContent = 'Collecting Set content, please wait...'; - return L.resolveDefault(fs.exec_direct('/etc/init.d/banip', ['content', set])).then(function (res) { + return L.resolveDefault(fs.exec_direct('/etc/init.d/banip', ['content', set, isChecked])).then(function (res) { let result = document.getElementById('result'); result.textContent = res.trim(); document.getElementById('set').value = ''; @@ -191,7 +205,7 @@ return view.extend({ E('th', { 'class': 'th' }, _('Inbound (packets)')), E('th', { 'class': 'th' }, _('Outbound (packets)')), E('th', { 'class': 'th' }, _('Port / Protocol')), - E('th', { 'class': 'th' }, _('Elements')) + E('th', { 'class': 'th' }, _('Elements (max. 50)')) ]) ]); diff --git a/applications/luci-app-banip/root/usr/share/rpcd/acl.d/luci-app-banip.json b/applications/luci-app-banip/root/usr/share/rpcd/acl.d/luci-app-banip.json index 57332394d7..ffff57aeea 100644 --- a/applications/luci-app-banip/root/usr/share/rpcd/acl.d/luci-app-banip.json +++ b/applications/luci-app-banip/root/usr/share/rpcd/acl.d/luci-app-banip.json @@ -63,7 +63,7 @@ "/etc/init.d/banip search [A-Za-z0-9:.]*": [ "exec" ], - "/etc/init.d/banip content [A-Za-z0-9]*": [ + "/etc/init.d/banip content [A-Za-z0-9]* *": [ "exec" ], "/etc/init.d/banip status": [